package com.mjk.common.web.getway.restful.interceptor.type.view;


import com.mjk.common.base.response.BeeResponse;
import com.mjk.common.tools.interceptor.DefaultInterceptorChain;
import com.mjk.common.web.getway.constns.GetWayError;
import com.mjk.common.web.getway.restful.interceptor.GetWayInterceptorReq;
import com.mjk.common.web.getway.restful.interceptor.InterceptorInvoker;

/**
 * 公用网关执行器
 * @author mjk
 *
 */
public class ViewInterceptorInvoker implements InterceptorInvoker {
	
	@Override
	public BeeResponse invoker(
			DefaultInterceptorChain<GetWayInterceptorReq, BeeResponse> chains,
			GetWayInterceptorReq req) {
		if(req.getIsPre()){
			return GetWayError.IS_VIEW_PRE_REQ.tranceError("");
		}
		return chains.proceed(req);
	}
}